<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
    <meta charset="UTF-8"/>
    <title><?php echo $title; ?></title>
    <base href="<?php echo $base; ?>"/>
    <?php if ($description) { ?>
    <meta name="description" content="<?php echo $description; ?>"/>
    <?php } ?>
    <?php if ($keywords) { ?>
    <meta name="keywords" content="<?php echo $keywords; ?>"/>
    <?php } ?>
    <?php if ($icon) { ?>
    <link href="<?php echo $icon; ?>" rel="icon"/>
    <?php } ?>
    <?php foreach ($links as $link) { ?>
    <link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>"/>
    <?php } ?>
    <link rel="stylesheet" type="text/css" href="catalog/view/theme/palioxis/stylesheet/stylesheet.css"/>
    <?php foreach ($styles as $style) { ?>
    <link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>"
          media="<?php echo $style['media']; ?>"/>
    <?php } ?>
    <script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
    <link rel="stylesheet" type="text/css"
          href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css"/>
    <script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
    <script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
    <link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen"/>
    <script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
    <script type="text/javascript" src="catalog/view/javascript/common.js"></script>
    <script type="text/javascript" src="catalog/view/theme/palioxis/js/custom.js"></script>
    <?php foreach ($scripts as $script) { ?>
    <script type="text/javascript" src="<?php echo $script; ?>"></script>
    <?php } ?>
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="catalog/view/theme/palioxis/stylesheet/ie7.css"/>
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="catalog/view/theme/palioxis/stylesheet/ie6.css"/>
    <script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
    <script type="text/javascript">
        DD_belatedPNG.fix('#logo img');
    </script>
    <![endif]-->
    <?php echo $google_analytics; ?>
    <meta name="google-translate-customization" content="cb107a272b5a6001-5ea0882581b25c88-gf3e75266d917e54c-1d"></meta>
    <script type="text/javascript" src="catalog/view/javascript/custom.js"></script>
</head>
<body>

<div id="container">
    <div id="header">
        <?php if ($logo) { ?>
        <div id="logo">
            <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>"
                                                alt="<?php echo $name; ?>"/></a>
            <a class="blue bold" href="<?php echo $home; ?>"><?php echo $name; ?></a>
        </div>
        <?php } ?>
        <?php echo $language; ?>
        <?php echo $currency; ?>
        <div id="google_translate_element" class="flr" style="margin: 5px; 0"></div>
        <script type="text/javascript">
            function googleTranslateElementInit() {
                new google.translate.TranslateElement({pageLanguage: 'ru', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
            }
        </script>
        <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
        <div class="clr"></div>

        <div id="search">
            <div class="button-search">
                <span class="bst"><?php echo $text_search; ?></span>
            </div>
            <?php if ($filter_name) { ?>
            <input type="text" name="filter_name" value="<?php echo $filter_name; ?>"/>
            <?php } else { ?>
            <input type="text" name="filter_name" onclick="this.value = '';" onkeydown="this.style.color = '#525252';"/>
            <?php } ?>
        </div>
        <?php
        if (!isset($this->request->get['route'])) {
        $this->request->get['route']='common/home'; // Чтобы не выдавало ошибку, если юзер набрал адрес в браузере руками
        }

        if ($this->request->get['route']=='common/home') {

        } else {
            echo $cart;
        }
        ?>
    </div>
    <div>
        <div>
            <?php if ($categories) { ?>
            <div id="tlc">
                <div id="tlc-wrapper">
                    <div class="lks"><img src="catalog/view/theme/palioxis/image/home.png" alt="Home"/>
                        <a href="<?php echo $home; ?>"><?php echo $text_home; ?></a>
                        <a href="/index.php?route=information/information&information_id=4">О нас</a>
                        <a href="/index.php?route=information/information&information_id=7">Маркетинг</a>
                        <a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>
                        <a href="<?php echo $account; ?>"><?php echo $text_account; ?></a>
                        <a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a>
                        <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a>
                    </div>
                    <div id="welcome">
                        <?php if (!$logged) { ?>
                        <?php echo $text_welcome; ?>
                        <?php } else { ?>
                        <?php echo $text_logged; ?>
                        <?php } ?>
                    </div>
                </div>
            </div>
            <?php } ?>
        </div>
    </div>
